package com.bestv.search.common.service.impl;

import com.bestv.search.common.dao.UserStatusDao;
import com.bestv.search.common.dataSource.DataSourceKey;
import com.bestv.search.common.model.UserStatusSummary;
import com.bestv.search.common.service.UserStatusManager;

import java.util.Date;
import java.util.List;

public class UserStatusManagerImpl implements UserStatusManager {

    private UserStatusDao userStatusDao;

    @Override
    public void updateUserStatus(DataSourceKey key) {
        userStatusDao.updateUserStatus();
    }

    @Override
    public List<UserStatusSummary> getUserStatusOfSummary(DataSourceKey key, Date start, Date end) {
        return userStatusDao.getUserStatusOfSummary(start, end);
    }

    @Override
    public List<String[]> getNewUserAmountByMonth(DataSourceKey key, String startMonth, String endMonth) {
        return userStatusDao.getNewUserAmountByMonth(startMonth, endMonth);
    }

    public UserStatusDao getUserStatusDao() {
        return userStatusDao;
    }

    public void setUserStatusDao(UserStatusDao userStatusDao) {
        this.userStatusDao = userStatusDao;
    }
}